3.56 \(\int \frac {(a+b \log (c x^n))^2}{x^3} \, dx\)

Optimal. Leaf size=52 \[ -\frac {b n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {b^2 n^2}{4 x^2} \]

[Out]

-1/4*b^2*n^2/x^2-1/2*b*n*(a+b*ln(c*x^n))/x^2-1/2*(a+b*ln(c*x^n))^2/x^2

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2305, 2304} \[ -\frac {b n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {b^2 n^2}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])^2/x^3,x]

[Out]

-(b^2*n^2)/(4*x^2) - (b*n*(a + b*Log[c*x^n]))/(2*x^2) - (a + b*Log[c*x^n])^2/(2*x^2)

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx &=-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}+(b n) \int \frac {a+b \log \left (c x^n\right )}{x^3} \, dx\\ &=-\frac {b^2 n^2}{4 x^2}-\frac {b n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 41, normalized size = 0.79 \[ -\frac {2 \left (a+b \log \left (c x^n\right )\right )^2+b n \left (2 a+2 b \log \left (c x^n\right )+b n\right )}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])^2/x^3,x]

[Out]

-1/4*(2*(a + b*Log[c*x^n])^2 + b*n*(2*a + b*n + 2*b*Log[c*x^n]))/x^2

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 83, normalized size = 1.60 \[ -\frac {2 \, b^{2} n^{2} \log \relax (x)^{2} + b^{2} n^{2} + 2 \, b^{2} \log \relax (c)^{2} + 2 \, a b n + 2 \, a^{2} + 2 \, {\left (b^{2} n + 2 \, a b\right )} \log \relax (c) + 2 \, {\left (b^{2} n^{2} + 2 \, b^{2} n \log \relax (c) + 2 \, a b n\right )} \log \relax (x)}{4 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^3,x, algorithm="fricas")

[Out]

-1/4*(2*b^2*n^2*log(x)^2 + b^2*n^2 + 2*b^2*log(c)^2 + 2*a*b*n + 2*a^2 + 2*(b^2*n + 2*a*b)*log(c) + 2*(b^2*n^2
+ 2*b^2*n*log(c) + 2*a*b*n)*log(x))/x^2

________________________________________________________________________________________

giac [A]  time = 0.34, size = 90, normalized size = 1.73 \[ -\frac {b^{2} n^{2} \log \relax (x)^{2}}{2 \, x^{2}} - \frac {{\left (b^{2} n^{2} + 2 \, b^{2} n \log \relax (c) + 2 \, a b n\right )} \log \relax (x)}{2 \, x^{2}} - \frac {b^{2} n^{2} + 2 \, b^{2} n \log \relax (c) + 2 \, b^{2} \log \relax (c)^{2} + 2 \, a b n + 4 \, a b \log \relax (c) + 2 \, a^{2}}{4 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^3,x, algorithm="giac")

[Out]

-1/2*b^2*n^2*log(x)^2/x^2 - 1/2*(b^2*n^2 + 2*b^2*n*log(c) + 2*a*b*n)*log(x)/x^2 - 1/4*(b^2*n^2 + 2*b^2*n*log(c
) + 2*b^2*log(c)^2 + 2*a*b*n + 4*a*b*log(c) + 2*a^2)/x^2

________________________________________________________________________________________

maple [C]  time = 0.16, size = 703, normalized size = 13.52 \[ -\frac {b^{2} \ln \left (x^{n}\right )^{2}}{2 x^{2}}-\frac {\left (-i \pi \,b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i \pi \,b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi \,b^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi \,b^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+b^{2} n +2 b^{2} \ln \relax (c )+2 a b \right ) \ln \left (x^{n}\right )}{2 x^{2}}-\frac {-\pi ^{2} b^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+2 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+2 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-4 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{4}-2 i \pi \,b^{2} n \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-4 i \pi \,b^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3} \ln \relax (c )-4 i \pi a b \mathrm {csgn}\left (i c \,x^{n}\right )^{3}+4 a^{2}+2 i \pi \,b^{2} n \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+2 i \pi \,b^{2} n \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+4 i \pi \,b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \relax (c )+4 i \pi \,b^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2} \ln \relax (c )+4 i \pi a b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+4 i \pi a b \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+2 b^{2} n^{2}-\pi ^{2} b^{2} \mathrm {csgn}\left (i c \right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{4}+2 \pi ^{2} b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{5}-\pi ^{2} b^{2} \mathrm {csgn}\left (i x^{n}\right )^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{4}+2 \pi ^{2} b^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{5}+8 a b \ln \relax (c )+4 b^{2} n \ln \relax (c )+4 b^{2} \ln \relax (c )^{2}+4 a b n -\pi ^{2} b^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{6}-4 i \pi \,b^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right ) \ln \relax (c )-4 i \pi a b \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-2 i \pi \,b^{2} n \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )}{8 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))^2/x^3,x)

[Out]

-1/2*b^2/x^2*ln(x^n)^2-1/2*(I*Pi*b^2*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-
I*Pi*b^2*csgn(I*c*x^n)^3+I*Pi*b^2*csgn(I*c)*csgn(I*c*x^n)^2+2*b^2*ln(c)+b^2*n+2*a*b)/x^2*ln(x^n)-1/8*(-Pi^2*b^
2*csgn(I*c)^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2-4*Pi^2*b^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)^4+2*Pi^2*b^2*csgn(I
*c)^2*csgn(I*x^n)*csgn(I*c*x^n)^3+2*Pi^2*b^2*csgn(I*c)*csgn(I*x^n)^2*csgn(I*c*x^n)^3-4*I*Pi*a*b*csgn(I*c*x^n)^
3-4*I*Pi*b^2*csgn(I*c*x^n)^3*ln(c)+4*a^2+2*b^2*n^2+8*a*b*ln(c)+4*b^2*n*ln(c)-2*I*Pi*b^2*n*csgn(I*c*x^n)^3+4*b^
2*ln(c)^2-Pi^2*b^2*csgn(I*x^n)^2*csgn(I*c*x^n)^4+2*Pi^2*b^2*csgn(I*x^n)*csgn(I*c*x^n)^5+4*a*b*n-Pi^2*b^2*csgn(
I*c*x^n)^6+2*Pi^2*b^2*csgn(I*c)*csgn(I*c*x^n)^5-Pi^2*b^2*csgn(I*c)^2*csgn(I*c*x^n)^4+4*I*Pi*a*b*csgn(I*c)*csgn
(I*c*x^n)^2+2*I*Pi*b^2*n*csgn(I*x^n)*csgn(I*c*x^n)^2+2*I*Pi*b^2*n*csgn(I*c*x^n)^2*csgn(I*c)+4*I*Pi*b^2*csgn(I*
x^n)*csgn(I*c*x^n)^2*ln(c)+4*I*Pi*b^2*csgn(I*c)*csgn(I*c*x^n)^2*ln(c)+4*I*Pi*a*b*csgn(I*x^n)*csgn(I*c*x^n)^2-4
*I*Pi*b^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*ln(c)-4*I*Pi*a*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-2*I*Pi*b^2*
n*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c))/x^2

________________________________________________________________________________________

maxima [A]  time = 0.60, size = 71, normalized size = 1.37 \[ -\frac {1}{4} \, b^{2} {\left (\frac {n^{2}}{x^{2}} + \frac {2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} - \frac {b^{2} \log \left (c x^{n}\right )^{2}}{2 \, x^{2}} - \frac {a b n}{2 \, x^{2}} - \frac {a b \log \left (c x^{n}\right )}{x^{2}} - \frac {a^{2}}{2 \, x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))^2/x^3,x, algorithm="maxima")

[Out]

-1/4*b^2*(n^2/x^2 + 2*n*log(c*x^n)/x^2) - 1/2*b^2*log(c*x^n)^2/x^2 - 1/2*a*b*n/x^2 - a*b*log(c*x^n)/x^2 - 1/2*
a^2/x^2

________________________________________________________________________________________

mupad [B]  time = 3.43, size = 62, normalized size = 1.19 \[ -\frac {\frac {a^2}{2}+\frac {a\,b\,n}{2}+\frac {b^2\,n^2}{4}}{x^2}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {n\,b^2}{2}+a\,b\right )}{x^2}-\frac {b^2\,{\ln \left (c\,x^n\right )}^2}{2\,x^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*log(c*x^n))^2/x^3,x)

[Out]

- (a^2/2 + (b^2*n^2)/4 + (a*b*n)/2)/x^2 - (log(c*x^n)*(a*b + (b^2*n)/2))/x^2 - (b^2*log(c*x^n)^2)/(2*x^2)

________________________________________________________________________________________

sympy [B]  time = 1.12, size = 128, normalized size = 2.46 \[ - \frac {a^{2}}{2 x^{2}} - \frac {a b n \log {\relax (x )}}{x^{2}} - \frac {a b n}{2 x^{2}} - \frac {a b \log {\relax (c )}}{x^{2}} - \frac {b^{2} n^{2} \log {\relax (x )}^{2}}{2 x^{2}} - \frac {b^{2} n^{2} \log {\relax (x )}}{2 x^{2}} - \frac {b^{2} n^{2}}{4 x^{2}} - \frac {b^{2} n \log {\relax (c )} \log {\relax (x )}}{x^{2}} - \frac {b^{2} n \log {\relax (c )}}{2 x^{2}} - \frac {b^{2} \log {\relax (c )}^{2}}{2 x^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))**2/x**3,x)

[Out]

-a**2/(2*x**2) - a*b*n*log(x)/x**2 - a*b*n/(2*x**2) - a*b*log(c)/x**2 - b**2*n**2*log(x)**2/(2*x**2) - b**2*n*
*2*log(x)/(2*x**2) - b**2*n**2/(4*x**2) - b**2*n*log(c)*log(x)/x**2 - b**2*n*log(c)/(2*x**2) - b**2*log(c)**2/
(2*x**2)

________________________________________________________________________________________